import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";

Vue.config.productionTip = true;

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");

/// 全局标提
document.title = "安品";

router.beforeEach((to, from, next) => {
  if (to.meta.title) {
    document.title = to.meta.title;
  } else {
    document.title = "安品";
  }
  next();
});

import VueAwesomeSwiper from "vue-awesome-swiper";

// require styles
// import 'swiper/dist/css/swiper.css'

Vue.use(VueAwesomeSwiper);

console.log("=======>>>>>" + process.env.NODE_ENV);

//引入两个文件
import api from "./api/api";
import http from "./api/http";
//挂载到VUE实例，以便全局使用
Vue.prototype.api = api;
Vue.prototype.http = http;
